<?php
/* @var $this SiteController */


$this->pageTitle = Yii::app()->name . ' - Register';
$this->breadcrumbs = array(
    'Register',
);
?>
<div id="wrapper">
    <div class="register_form">
        <h1>Đăng kí tài khoản</h1>
        <div class="form">
            <?php
            $form = $this->beginWidget('CActiveForm', array(
                'id' => 'register-form',
                'enableAjaxValidation' => false,
                    ));
            ?>

            <p class="note" style="margin-left:-20px;"> Các trường có dấu <span class="required">*</span> là bắt buộc.</p>

            <?php echo $form->errorSummary($model); ?>
            <table style="margin-left:80px;text-align:left;">
                <tr>
                <div class="row">
                    <td><?php echo $form->labelEx($model, 'use_username'); ?></td>
                    <td><?php echo $form->textField($model, 'use_username', array('size' => 32, 'maxlength' => 32)); ?></td>
                    <td><?php echo $form->error($model, 'use_username'); ?></td>
                </div>
                </tr>
                <tr>
                <div class="row">
                    <td><?php echo $form->labelEx($model, 'use_email'); ?></td>
                    <td><?php echo $form->textField($model, 'use_email', array('size' => 32, 'maxlength' => 128)); ?></td>
                    <td><?php echo $form->error($model, 'use_email'); ?></td>
                </div>
                </tr>
                <tr>
                <div class="row">
                    <td><?php echo $form->labelEx($model, 'use_password'); ?></td>
                    <td><?php echo $form->passwordField($model, 'use_password', array('size' => 32, 'maxlength' => 32)); ?></td>
                    <td><?php echo $form->error($model, 'use_password'); ?></td>
                </div>
                </tr>
                <tr>
                <div class="row">
                    <td><?php echo $form->label($model, 'use_password_repeat'); ?></td>
                    <td><?php echo $form->passwordField($model, 'use_password_repeat', array('size' => 32, 'maxlength' => 32)); ?></td>
                    <td><?php echo $form->error($model, 'use_password_repeat'); ?></td>
                </div>
                </tr>
            </table>
            <?php if (CCaptcha::checkRequirements()): ?>
                <div class="row" style="margin-left:-10px;">
                    <?php echo $form->labelEx($model, 'verifyCode'); ?>
                    <div>
                        <?php $this->widget('CCaptcha', array('buttonLabel' => "Refesh", 'showRefreshButton' => false, 'clickableImage' => true)); ?>
                        <br/>
                        <?php echo $form->textField($model, 'verifyCode'); ?>
                    </div>
                    <div class="hint">Nhập các ký tự như trong hình trên.<br/>
                        Nếu nhìn không rõ bạn refresh lại hình.</div>
                    <?php echo $form->error($model, 'verifyCode'); ?>
                </div>
            <?php endif; ?>
            <div class="row buttons">
                <td></td><td><?php echo CHtml::submitButton($model->isNewRecord ? 'Đăng kí' : 'Save'); ?></td>
            </div>
            <?php $this->endWidget(); ?>

        </div><!-- form -->
    </div>
</div>